<html>
<head><meta charset="utf-8"><title>Infinite bug · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html">Infinite bug</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213433415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213433415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213433415">(Oct 15 2020 at 14:25)</a>:</h4>
<p>Theoretical question. How do you fix a bug in a bootstrapping compiler if to compile the fix to the compiler you needed the fix itself to already be in the compiler. Is such a bug even possible? Can one, say, binary edit the output or something of the sort?</p>



<a name="213433598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213433598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213433598">(Oct 15 2020 at 14:26)</a>:</h4>
<p>if you have unsoundness in the compiler, you're in trouble, yes</p>



<a name="213433644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213433644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213433644">(Oct 15 2020 at 14:26)</a>:</h4>
<p>but normally the bugs are just errors, and you can implement the feature without actually using the feature</p>



<a name="213433670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213433670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213433670">(Oct 15 2020 at 14:26)</a>:</h4>
<p>If there is a bug in a bootstrapping compiler that prevents you from compiling the fixed compiler, you will have to change the fixed compiler to workaround the bug.</p>



<a name="213433863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213433863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213433863">(Oct 15 2020 at 14:27)</a>:</h4>
<p>Ah... That makes sense. Thanks.</p>



<a name="213471498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213471498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213471498">(Oct 15 2020 at 18:55)</a>:</h4>
<p>This sort of thing is my nightmare <span aria-label="grinning" class="emoji emoji-1f600" role="img" title="grinning">:grinning:</span></p>



<a name="213477483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213477483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213477483">(Oct 15 2020 at 19:40)</a>:</h4>
<p>see also <a href="https://www.win.tue.nl/~aeb/linux/hh/thompson/trust.html">https://www.win.tue.nl/~aeb/linux/hh/thompson/trust.html</a> and <a href="https://github.com/rust-lang/rust/issues/48707">https://github.com/rust-lang/rust/issues/48707</a></p>



<a name="213497327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213497327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213497327">(Oct 15 2020 at 22:46)</a>:</h4>
<p><span class="user-mention" data-user-id="256313">@Hameer Abbasi</span> worst come to worst you can always start a new bootstrap branch from the oldest compiler that could compile a fixed version of the compiler.  But I don't see a realistic scenario where it'd be impossible to workaround the bug.</p>



<a name="213497407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213497407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213497407">(Oct 15 2020 at 22:47)</a>:</h4>
<p>I think there are multiple organizations that have bootstrapped their own rustc by now through mrustc.  Dunno if they have redistributed or even just published hashes from that, though...</p>



<a name="213497968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213497968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213497968">(Oct 15 2020 at 22:54)</a>:</h4>
<p>That doesn't help if the bug is more than single release back though</p>



<a name="213497993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213497993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213497993">(Oct 15 2020 at 22:54)</a>:</h4>
<p>Especially because of rustc's "only builds with beta and master" policy</p>



<a name="213498286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213498286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213498286">(Oct 15 2020 at 22:58)</a>:</h4>
<p>It's just be like a <code>git rebase</code>.  You throw away the last N bootstrap compilers and make new versions of them.</p>



<a name="213500244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213500244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213500244">(Oct 15 2020 at 23:23)</a>:</h4>
<p>the new versions would also have the bug. remember for there to be a miscompilation there needs to be a bug in the compiler. The scenario is 1.42 has a miscompile, which changes something in 1.43, which snowballs to the latest release in 1.47. Recompiling doesn't help because 1.42 will still miscompile 1.43.</p>



<a name="213500282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213500282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213500282">(Oct 15 2020 at 23:23)</a>:</h4>
<p>you need to change the source code at some point, which I guess is technically possible but backporting a fix &gt;2 releases sounds extremely painful</p>



<a name="213500346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213500346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213500346">(Oct 15 2020 at 23:24)</a>:</h4>
<p>note that this doesn't matter whether you compiled 1.42 with mrustc or with 1.41; either way it will miscompile 1.43</p>



<a name="213500373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213500373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213500373">(Oct 15 2020 at 23:25)</a>:</h4>
<p>or you find a codegen option that avoids the bad aspect of the broken version</p>



<a name="213500412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213500412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213500412">(Oct 15 2020 at 23:25)</a>:</h4>
<p>sure, in practice this is pretty unlikely to happen</p>



<a name="213500497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213500497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213500497">(Oct 15 2020 at 23:26)</a>:</h4>
<p>or if the codegen problem is arch-specific, do a new cross-compile from a good host</p>



<a name="213500763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213500763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213500763">(Oct 15 2020 at 23:30)</a>:</h4>
<p>this discussion also smells a bit like Reflections on Trusting Trust</p>



<a name="213500820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213500820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213500820">(Oct 15 2020 at 23:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="138448">cuviper</span> <a href="#narrow/stream/122651-general/topic/Infinite.20bug/near/213500763">said</a>:</p>
<blockquote>
<p>this discussion also smells a bit like Reflections on Trusting Trust</p>
</blockquote>
<p><a href="#narrow/stream/122651-general/topic/Infinite.20bug/near/213477483">https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Infinite.20bug/near/213477483</a> ;)</p>



<a name="213501830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213501830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213501830">(Oct 15 2020 at 23:46)</a>:</h4>
<p>ha, I skimmed too fast</p>



<a name="213526873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213526873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213526873">(Oct 16 2020 at 07:31)</a>:</h4>
<p>Someone needs to write a blog post entitled "Reflections on Trusting Rust" :D</p>



<a name="213572564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Infinite%20bug/near/213572564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Infinite.20bug.html#213572564">(Oct 16 2020 at 15:07)</a>:</h4>
<p>Will you accept "Reflections on Rusting Trust"?<br>
<a href="https://manishearth.github.io/blog/2016/12/02/reflections-on-rusting-trust/">https://manishearth.github.io/blog/2016/12/02/reflections-on-rusting-trust/</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>